package com.berwin.bmfb.views.components;

import com.berwin.bmfb.views.layout.VerticalFlowLayout;
import com.sun.tools.javac.comp.Flow;

import javax.swing.*;
import java.awt.*;

public class InputItemView extends JPanel {

    private String title;

    private JTextField textField;

    public InputItemView(String title) {
        this.title = title;
        this.setLayout(new GridLayout(1, 2));

//        JPanel leftContainers = new JPanel(new FlowLayout(FlowLayout.RIGHT));
//        this.add(leftContainers);
//        JPanel left = new JPanel(new VerticalFlowLayout(VerticalFlowLayout.CENTER));
//        leftContainers.add(left);
        JLabel lblTitle = new JLabel(this.title);
        this.add(lblTitle);

//        JPanel right = new JPanel(new FlowLayout(FlowLayout.LEADING));
//        this.add(right);
        this.textField = new JTextField(10);
        this.add(this.textField);

        this.setBackground(Color.RED);

    }

    public JTextField getTextField() {
        return textField;
    }

    public void setTextField(JTextField textField) {
        this.textField = textField;
    }
}
